<?php /* Smarty version 2.6.16, created on 2009-04-26 00:25:40
         compiled from AddForm.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'messages', 'AddForm.html', 29, false),array('function', 'url', 'AddForm.html', 32, false),array('function', 'language', 'AddForm.html', 41, false),)), $this); ?>
<?php if ($this->_tpl_vars['useAjax']): ?>
<script type="text/javascript">
<?php echo '
function submitComment()
{
	if (typeof(updateAd) != \'undefined\')
	{
		updateAd();
	}
	sId(\'comment_submit_button\').disabled=true;
	if ( typeof(tinyMCE) != \'undefined\' )
	{
		tinyMCE.triggerSave(false, false);
		tinyMCE.execCommand(\'mceSetContent\',false, \'\');
	}
	new Effect.Appear(\'ajax_main_image_cm\');
	xajax_newComment(xajax.getFormValues("commentForm"));
	if ( typeof(tinyMCE) == \'undefined\' )
	{
		sId(\'maintext\').value=\'\';		
	}
	return false;
}
'; ?>

</script>
<?php endif; ?>
<div>
<?php if ($this->_tpl_vars['bLogged']):  echo smarty_function_messages(array('block' => 'add-comment','error_var' => 'aErrors2'), $this);?>

<?php if ($this->_tpl_vars['sCommentType'] == 'account'):  if (! $this->_tpl_vars['useAjax']): ?>
<form method="post" action="<?php echo smarty_function_url(array('link' => 'current','type' => $this->_tpl_vars['sCommentType'],'cid' => $this->_tpl_vars['mId']), $this);?>
">
<div><input type="hidden" name="val[alert_id]" value="<?php echo $this->_tpl_vars['iAlertId']; ?>
" /></div>
<?php else: ?>
<form id="commentForm" method="post" action="javascript:void(null);" onsubmit="submitComment();">
<div><input type="hidden" name="alert_id" value="<?php echo $this->_tpl_vars['iAlertId']; ?>
" /></div>
<div><input type="hidden" name="ajax_isuser" value="<?php echo $this->_tpl_vars['isuser']; ?>
" /></div>
<div><input type="hidden" name="ajax_id" value="<?php echo $this->_tpl_vars['mId']; ?>
" /></div>
<div><input type="hidden" name="ajax_type" value="<?php echo $this->_tpl_vars['sCommentType']; ?>
" /></div>
<div class="ajax_message" id="ajax_main_image_cm" style="display:none; font-size:10pt; font-weight:bold;">
	<img src="design/pic/loader.gif" alt="" style="vertical-align:middle;" /> <span id="ajax_comment_info"><?php echo smarty_function_language(array('text' => "comment.being.added"), $this);?>
</span>
</div>
<?php endif; ?>
<div id="ajax_main_form" style="font-size:10pt;">
	<div style="padding:6px;"><b><?php echo smarty_function_language(array('text' => 'leave_me_a_comment'), $this);?>
</b></div>
	<div><textarea cols="60" rows="10" name="val[text]" style="width:90%;" id="maintext" onfocus="this.style.backgroundColor='#fff';" onblur="this.style.backgroundColor='#F6F6F6';"><?php echo $this->_tpl_vars['aValues']['text']; ?>
</textarea></div>
	<div style="padding:6px;">
		<div>
			<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['sMainTemplatePath'])."/_blocks/smilies.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>			
		</div>
		<div style="padding:5px; text-align:center; margin-top:8px;">
			<input id="comment_submit_button" type="submit" name="act[comment]" value="<?php echo smarty_function_language(array('text' => 'submit_comment'), $this);?>
" class="mainmenu6" onmouseover="this.className='mainmenu7';" onmouseout="this.className='mainmenu6';" onclick="if (document.getElementById('formhide1')) <?php echo '{'; ?>
 document.getElementById('formhide1').style.display='none';document.getElementById('formhide2').style.display=''; <?php echo '}'; ?>
" />
		</div>
	</div>
</div>

</form>
<?php else: ?>

<?php if (! $this->_tpl_vars['useAjax']): ?>
<form method="post" action="<?php echo smarty_function_url(array('link' => 'current','type' => $this->_tpl_vars['sCommentType'],'cid' => $this->_tpl_vars['mId']), $this);?>
" style="margin:0px;">
<div><input type="hidden" name="val[alert_id]" value="<?php echo $this->_tpl_vars['iAlertId']; ?>
" /></div>
<?php else: ?>
<form id="commentForm" method="post" action="javascript:void(null);" onsubmit="submitComment();">
<div><input type="hidden" name="alert_id" value="<?php echo $this->_tpl_vars['iAlertId']; ?>
" /></div>
<div><input type="hidden" name="ajax_id" value="<?php echo $this->_tpl_vars['mId']; ?>
" /></div>
<div><input type="hidden" name="ajax_type" value="<?php echo $this->_tpl_vars['sCommentType']; ?>
" /></div>
<div class="ajax_message" id="ajax_main_image_cm" style="display:none; font-size:10pt; font-weight:bold;">
	<img src="design/pic/loader.gif" alt="" style="vertical-align:middle;" /> <span id="ajax_comment_info"><?php echo smarty_function_language(array('text' => "comment.being.added"), $this);?>
</span>
</div>
<?php endif; ?>
<div id="ajax_main_form" style="font-size:10pt;">
	<div style="padding-bottom:4px;"><b><label for="maintext"><?php echo smarty_function_language(array('text' => 'your_comment'), $this);?>
:</label></b></div>
	<div><textarea cols="60" rows="10" style="width:90%;" name="val[text]" id="maintext" onfocus="this.style.backgroundColor='#fff';" onblur="this.style.backgroundColor='#F6F6F6';"><?php echo $this->_tpl_vars['aValues']['text']; ?>
</textarea></div>
	<div style="padding-top:4px;">
		<div>
			<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['sMainTemplatePath'])."/_blocks/smilies.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>			
		</div>
		<input id="comment_submit_button" type="submit" name="act[comment]" value="<?php echo smarty_function_language(array('text' => 'submit_comment'), $this);?>
" class="mainmenu6" onmouseover="this.className='mainmenu7';" onmouseout="this.className='mainmenu6';" onclick="if (document.getElementById('formhide1')) <?php echo '{'; ?>
 document.getElementById('formhide1').style.display='none';document.getElementById('formhide2').style.display=''; <?php echo '}'; ?>
" />
	</div>
</div>
</form>
<br />
<?php endif;  else: ?>
<div style="font-size:10pt;">
	<a class="link_action" href="<?php echo smarty_function_url(array('link' => 'public.login'), $this);?>
">[ <?php echo smarty_function_language(array('text' => 'login_to_post_a_comment'), $this);?>
 ]</a>
</div>
<?php endif; ?>
</div>